<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="chtml" uri="http://www.szhelper.com/jsp/html"%>
<%@include file="/page/common/public.jspf"%>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人基本信息设置</title>
<link rel="stylesheet" type="text/css" href="${path}/css/base.css"/>
<link rel="stylesheet" type="text/css" href="${path}/css/layout.css"/>
<script type="text/javascript" src="${path}/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	$(function(){
		var $$ = function (id) {
			return document.getElementById(id);
			}
			window.onload = function () {
			var btnSelect = $$("btn_select");
			var curSelect = btnSelect.getElementsByTagName("span")[0];
			var oSelect = btnSelect.getElementsByTagName("select")[0];
			var aOption = btnSelect.getElementsByTagName("option");
			oSelect.onchange = function () {
			var text=oSelect.options[oSelect.selectedIndex].text;
			curSelect.innerHTML = text;
			}
			} 	
		})
		
		// userInfo数据列表表单提交脚本
		function _submitAction4userInfo(obj, action, params) {
			var submitForm;
			while ((obj.parentNode) && (obj.parentNode.tagName)
					&& (!obj.parentNode.tagName.match(/FORM/i))) {
				obj = obj.parentNode;
			}
			submitForm = obj.parentNode;
			if (!submitForm) {
				submitForm = document.createElement("form");
				document.body.appendChild(submitForm);
			}
			submitForm.setAttribute("action", action);
			submitForm.setAttribute("method", "POST");
			for ( var key in params) {
				var hiddenField = document.createElement("input");
				hiddenField.setAttribute("type", "hidden");
				hiddenField.setAttribute("name", key);
				hiddenField.setAttribute("value", params[key]);
				submitForm.appendChild(hiddenField);
			}
			if (submit4userInfo()) {
				submitForm.submit();
			}
				
		}
	function submit4userInfo() {
		var realName = $("input[name='realName']").val();
		var cardNumber = $("input[name='cardNumber']").val();
		var mobile = $("input[name='mobile']").val();
		
		if (realName == null || realName == "") {
			alert("请输入真实姓名");
			return false;
		}
		if (cardNumber == null || cardNumber == "") {
			alert("请输入身份证号码");
			return false;
		}
		if (mobile == null || mobile == "") {
			alert("请输入手机号码");
			return false;
		}
		return true;
	}
</script>
</head>

<body bgcolor="#f9f9f9">
        <!-- head -->
		<c:import url="../include/top.jsp"></c:import>
    	<!--主体-->
        	<div class="companyBox" style="width: 74%">
            	<div class="companyState">
                	<ul>
                    	<li>当前账户状态：<font>${user.status.text}</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	您的账户类型：<font>个人</font></li>
                        <li>尊敬的<font>${user.userName }</font>：
                        	感谢注册PPP金融服务网，您需完善详细信息后才能使用PPP金融服务网用户中心的各项功能。
                        	<input type="button" class="greenBtn w86" value="以后再说" /></li>
                    </ul>
                    <ul>
                    	<div class="companyBoxRight" style="width: 100%">
		                	<p>说明：提交个人基本信息是您使用PPP金融服务网各项服务的最基本要求，请务必填写完整并保证信息的真实性。通过审核后，
		                	您即可享受除融资外的各项服务。</p>
		                </div>
                    
                    </ul>
                </div>
			</div>
			
			
			<form id="userInfo" action="<%=request.getContextPath()%>/registerSave.htm"
			method="POST" onsubmit="return submit4userInfo();">
			<input type="hidden" name="id" id="id" value="${user.id}"/>
			<input type="hidden" name="password" id="password" value="${user.password}"/>
			<input type="hidden" name="pwdAttach" id="pwdAttach" value="${user.pwdAttach}"/>
			<input type="hidden" name="version" id="version" value="${user.version}"/>
			<input type="hidden" name="userName" id="userName" value="${user.userName}"/>
			<input type="hidden" name="loginSucNum" id="loginSucNum" value="${user.loginSucNum}"/>
			<input type="hidden" name="loginFailNum" id="loginFailNum" value="${user.loginFailNum}"/>
			<input type="hidden" name="status" id="status" value="${user.status}"/>
			<input type="hidden" name="type" id="type" value="PERSON"/>
            <input type="hidden" name="isEmailCheck" id="isEmailCheck" value="${user.isEmailCheck }"/>
			<input type="hidden" name="isMobileCheck" id="isMobileCheck" value="${user.isMobileCheck }"/>
			<input type="hidden" name="registerFrom" id="registerFrom" value="${user.registerFrom }"/>
			<input type="hidden" name="activeCode" id="activeCode" value="${user.activeCode }"/>
			<input type="hidden" name="isOpenAccount" id="isOpenAccount" value="${user.isOpenAccount }"/>
            
            
            <div class="wrap f_yh">
        	 <div class="registeredBox" style="margin-top: 0px;border: 1px solid #DFE0E4;border-top-width: 0">
            	<div class="borrow_list_cont f_yh">
                	
                	<table cellpadding="0" cellspacing="0" style="width: 100%">
                		<tr>
                            <td colspan="2" class="title_bg"><span></span>个人信息</td>
                        </tr>
                    	<tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>真实姓名：</td>
                            <td colspan="3">
                            	<div class="companyBox_greyBox_text"><input type="text" name="realName" value="" /></div>
                            </td>
                        </tr>
                    	<tr>
                        	<td class="tAlign_r">出生日期：</td>
                            <td colspan="3">
                            	<div class="companyBox_greyBox_text"><input type="text" name="birthday" value="" /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">性别（称呼)：</td>
                            <td colspan="3"><div class="registeredBox_greyBox_text">
								<select name="personSex">
									<option value="MAN">男</option>
									<option value="WOMAN">女</option>
								</select>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">所在地区：</td>
                            <td colspan="3">
                            	<a class="btn-select" id="btn_select" style="width: 400px;">
                                    <span class="cur-select" style="width: 400px;">请选择</span>
                                    <select  name="personArea" style="width: 400px;">
                                        <option value="BEIJING">北京市</option>
                                    	<option value="TIANJIN">天津市</option>
                                    	<option value="CHONGQING">重庆市</option>
                                    	<option value="SHANGHAI">上海市</option>
                                    	<option value="HEBEI">河北省</option>
                                    	<option value="SHANXI">山西省</option>
                                    	<option value="JILIN">吉林省</option>
                                    	<option value="LIAONIN">辽宁省</option>
                                    	<option value="HEILONGJIANG">黑龙江省</option>
                                    	<option value="SHANGXI">陕西省</option>
                                    	<option value="GANSHU">甘肃省</option>
                                    	<option value="QINGHAI">青海省</option>
                                    	<option value="SHANDONG">山东省</option>
                                    	<option value="FUJIAN">福建省</option>
                                    	<option value="ZHEJIANG">浙江省</option>
                                    	<option value="TAIWAN">台湾省</option>
                                    	<option value="HENAN">河南省</option>
                                    	<option value="HUBEI">湖北省</option>
                                    	<option value="HUNAN">湖南省</option>
                                    	<option value="JIANGXI">江西省</option>
                                    	<option value="JIANGSHU">江苏省</option>
                                    	<option value="ANHUI">安徽省</option>
                                    	<option value="GUANGDONG">广东省</option>
                                    	<option value="HAINAN">海南省</option>
                                    	<option value="SICHUAN">四川省</option>
                                    	<option value="GUIZHOU">贵州省</option>
                                    	<option value="YUNNAN">云南省</option>
                                    	<option value="NEIMENGGU">内蒙古自治区</option>
                                    	<option value="XINJIANG">新疆维吾尔自治区</option>
                                    	<option value="NINXIA">宁夏回族自治区</option>
                                    	<option value="GUANGXI">广西壮族自治区</option>
                                    	<option value="XIZANG">西藏自治区</option>
                                    	<option value="XIANGGANG">香港特别行政区</option>
                                    	<option value="AOMEN">澳门特别行政区</option>
                                    </select>
                                </a> 
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">从事行业：</td>
                            <td>
                            	<a class="btn-select" id="btn_select" style="width: 400px;">
                                    <span class="cur-select" style="width: 400px;">请选择</span>
                                    <select  name="bussinessType" style="width: 400px;">
                                        <option value="type1">计算机/互联网/通信/电子</option>
                                    	<option value="type2">会计/金融/银行/保险</option>
                                    	<option value="type3">贸易/消费/制造/保险</option>
                                    	<option value="type4">制药/医疗</option>
                                    	<option value="type5">广告/媒体</option>
                                    	<option value="type6">房地产/建筑</option>
                                    	<option value="type7">专业服务/教育/培训</option>
                                    	<option value="type8">服务业</option>
                                    	<option value="type9">物流/运输</option>
                                    	<option value="type10">能源/原材料</option>
                                    	<option value="type11">政府/非盈利性机构/其他</option>
                                    </select>
                                </a>  
                            </td> 
                        <tr>
                        	<td class="tAlign_r">工作单位：</td>
                            <td colspan="3">
                            	<div class="companyBox_greyBox_text"><input type="text"  name="personWorkCompany" /></div>
                            </td>
                        </tr>
                         <tr>
                        	<td class="tAlign_r">职务：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="personWorkDuty"/></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>身份证号码：</td>
                            <td colspan="3">
                            <div class="registeredBox_greyBox_text"><input type="text"  name="cardNumber"/></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>手机号码：</td>
                            <td colspan="3">
                            <div class="registeredBox_greyBox_text"><input type="text"  name="mobile"  value="${user.mobile}" /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">电子邮箱</td>
                            <td colspan="3">
                            <div class="registeredBox_greyBox_text"><input type="text"  name="email"  value="${user.email}" /></div>
                            </td> 
                        </tr>
                        <tr>
                        	<td colspan="4" class="tAlign_c">
	                        	<input type="button" 
	                        	onclick="javascript:if(true){void(_submitAction4userInfo(this,'<%=request.getContextPath()%>/registerSave.htm',{}));return false;}" 
	                        	class="bt_ty s_20" style="width: 20%;padding: 15px" value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;
	                        	<input type="button" onclick="javascript:void(history.back(-1))" 
	                        	class="bt_ty s_20" style="width: 20%;padding: 15px"  value="返回"/>
                        	</td>
                        </tr>
                    </table>
                    
                    </div>
                </div>
                </div>
                <div class="clear_both"></div>    
            </form>
    	<!--主体-->
    	<!--foot-->
        <c:import url="../include/foot.jsp"></c:import>
        <!--foot--> 
</body>
</html>